﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true"
    CodeBehind="ListEdit.aspx.cs" Inherits="Mang24k99.Web.CLMN.KtClmnItems.ListEdit"
    Title="Untitled Page" %>



<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">

        function GoEdit(id) {

            var pageUrl = "Edit.aspx";
            pageUrl = pageUrl + "?id=" + id;
            GoPageUrl(pageUrl);
            return false;
        }

        function CancelSelected() {
            var tag = $("#ctl00_ContentPlaceHolder1_lstStart");
            tag.attr("selectedIndex", -1);

            return "true";
        }

        function qtIndex(obj) {
            var returnValue;
            var chkName = obj.name;
            if (obj.checked == true) {
                returnValue = confirm("是否要在前台隐藏");
                if (returnValue) {
                    setTimeout('__doPostBack(\'' + chkName + '\',\'\')', 0)
                } else {
                    obj.checked = !obj.checked;
                }
            }
            else {
                returnValue = confirm("是否要在前台显示");
                if (returnValue) {
                    setTimeout('__doPostBack(\'' + chkName + '\',\'\')', 0)
                } else {
                    obj.checked = !obj.checked;
                }
            }
        }
        function SetAlias(sourceTagID, targetTagID) {
            var sourceVal = $("#" + sourceTagID).val();
            var targetVal = $("#" + targetTagID).val();
            if (targetVal == "") {
                $("#" + targetTagID).val(sourceVal);
            }
        }

        $(document).ready(
        function() {
            addTrHover("Table1");
            SetIfrHeight();
            InitialMsg();

        }
    )
    
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <table class="nav_Table1" border="0" cellpadding="0" cellspacing="0" width="100%"
            height="34">
            <tr>
                <td class="nav">
                    <asp:Label runat="server" ID="lblNav" Text="导航{0}"></asp:Label>
                </td>
            </tr>
        </table>
        <br />
        <table class="nav_Table1" border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                    <table width="50%" align="center" style="text-align: center">
                        <tr>
                            <td>
                            </td>
                            <td style="white-space: nowrap">
                                <asp:HyperLink ID="lnkColumn1" runat="server" Text="二级栏目" NavigateUrl="~/CLMN/KtClmnItems/ListEdit.aspx"
                                    CssClass="col"></asp:HyperLink>
                            </td>
                            <td style="white-space: nowrap">
                                <asp:HyperLink ID="lnkColumn2" runat="server" Text="三级栏目" NavigateUrl="~/CLMN/KtClmnItems/ListEdit.aspx"
                                    CssClass="col"></asp:HyperLink>
                            </td>
                            <td style="white-space: nowrap">
                                <asp:HyperLink ID="lnkColumn3" runat="server" Text="四级栏目" NavigateUrl="~/CLMN/KtClmnItems/ListEdit.aspx"
                                    CssClass="col"></asp:HyperLink>
                            </td>
                            <td style="white-space: nowrap">
                                <asp:HyperLink ID="lnkColumn4" runat="server" Text="查看/排序" NavigateUrl="~/CLMN/KtClmnItems/ListOrder.aspx"
                                    CssClass="col"></asp:HyperLink>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <br />
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td valign="top">
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td>
                                <table style="width: 100%;" class="tb_table2">
                                    <tr>
                                        <td colspan="2" class="nav">
                                            <asp:Label ID="lblColumnName" runat="server" Text="新增{0}栏目">
                                            
                                            </asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tb_title1">
                                            <asp:Label ID="lblNavColumnName" runat="server" Text="栏目名称:"></asp:Label>
                                        </td>
                                        <td class="tb_txt1">
                                            <asp:TextBox ID="txtColumnName" runat="server" CssClass="forms" MaxLength="120"></asp:TextBox><div
                                                id='divMsgtxtColumnName' class='msg'>
                                                <span style='color: red'>*</span></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tb_title1">
                                            <asp:Label ID="lblColumnAlias" runat="server" Text="栏目别称:"></asp:Label>
                                        </td>
                                        <td class="tb_txt1">
                                            <asp:TextBox ID="txtColumnAlias" runat="server" CssClass="forms" MaxLength="120"></asp:TextBox><div
                                                id='divMsgtxtColumnAlias' class='msg'>
                                                <span style='color: red'>*</span></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tb_title1">
                                            <asp:Label ID="lblNewsNum" runat="server" Text="好译星新闻条数:"></asp:Label>
                                        </td>
                                        <td class="tb_txt1">
                                            <asp:TextBox ID="txtNewsNum" runat="server" CssClass="forms" MaxLength="9" Text="500"></asp:TextBox><div
                                                id='divMsgtxtNewsNum' class='msg'>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr runat="server" id="tdDdlList2">
                                        <td class="tb_title1">
                                            <asp:Label ID="lblColumn2" runat="server" Text="二级栏目名称:"></asp:Label>
                                        </td>
                                        <td class="tb_txt1">
                                            <asp:DropDownList ID="ddlList2" runat="server" CssClass="forms" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlList2_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr runat="server" id="tdDdlList3">
                                        <td class="tb_title1">
                                            <asp:Label ID="lblColumn3" runat="server" Text="三级栏目名称:"></asp:Label>
                                        </td>
                                        <td class="tb_txt1">
                                            <asp:DropDownList ID="ddlList3" runat="server" CssClass="forms" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlList3_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top" align="center">
                    <table style="width: 80%;" class="tb_table2">
                        <tr>
                            <td class="nav" colspan="2">
                                <asp:Label ID="lbl" runat="server" Text="对应好译星栏目">
                                            
                                </asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="tb_title1">
                                <asp:Label ID="lblSepl" runat="server" Text="输入栏目"></asp:Label>
                            </td>
                            <td class="tb_txt1">
                                <asp:TextBox ID="txtStartValue" runat="server" CssClass="hidden"></asp:TextBox>
                                <asp:TextBox ID="txtSpell" CssClass="forms" runat="server" onkeyup="SearchStockShow(event,'lstStart')"
                                    onkeydown="SearchStockSelected(event,'lstStart')" onkeypress="SearchStockSelected(event,'lstStart')"
                                    AutoCompleteType="disabled"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="left">
                                <asp:ListBox ID="lstStart" CssClass="forms" runat="server" Height="100" Width="100%"
                                    ondblclick="RemoveDblClickOption(this)"></asp:ListBox>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table style="width: 200px; text-align: center" align="center">
            <tr>
                <td style="white-space: nowrap">
                    <asp:Button ID="btnSave" customMethod="CancelSelected" runat="server" Text="添 加"
                        CssClass="form_btn" OnClick="btnSave_Click" />
                </td>
                <td style="white-space: nowrap">
                    <asp:Button ID="btnReturn" runat="server" OnClientClick="return ConfirmCancel()"
                        Text="取 消" CssClass="form_btn" OnClick="btnReturn_Click" />
                </td>
            </tr>
        </table>
        <br />
        <table id="Table1" class="tb_table2">
            <asp:Repeater ID="Repeater1" runat="server" OnPreRender="Repeater1_PreRender" OnItemCommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                    <thead>
                        <tr>

                            <th class="tb_title2">
                                序号
                            </th>

                            <th class="tb_title2">
                                栏目名称
                            </th>

                            <th class="tb_title2">
                                子栏目
                            </th>

                            <th class="tb_title2">
                                好易星栏目
                            </th>

                            <th class="tb_title2">
                                隐藏
                            </th>

                            <th class="tb_title2">
                                创建时间
                            </th>

                            <th class="tb_title2">
                                操作选项
                            </th>

                        </tr>
                    </thead>
                    <tbody>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td class="tb_txt2">
                            <asp:Label ID="Label1" runat="server" Text='<%#Container.ItemIndex+1 %>'></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:Label runat="server" ID="lblColumnName" Text='<%#Common.PageHelper.HtmlEncode(Eval("ColumnName"))%>'></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:Label runat="server" ID="lblChildNum" Text='<%#Eval("IsHaveChild")%>'></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:Label runat="server" ID="lblTrastarCompos" ToolTip='<%#Common.PageHelper.HtmlEncode(Eval("TrastarCompos"))%>'
                                Text='<%#Common.PageHelper.HtmlEncode(Eval("TrastarColumns"))%>'></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:CheckBox ID="chkIsHide" runat="server" AutoPostBack="true" OnCheckedChanged="IsHide_CheckedChanged"
                                Checked='<%#Eval("IsHideBool")%>' Enabled='<%#Eval("IsEnableHide") %>' />
                            <asp:Label ID="lblID" runat="server" Text='<%#Eval("ColumnNO") %>' CssClass="hidden"></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:Label runat="server" ID="lblInputTime" Text='<%#Eval("InputTime")%>'></asp:Label>
                        </td>
                        <td class="tb_txt2">
                            <asp:Button runat="server" ID="btnModify" CssClass="form_btn" Text="修改" CommandName="modify"
                                CommandArgument='<%#Eval("ColumnNO") %>' Enabled='<%#Eval("IsEnableEdit")%>' />
                            <asp:Button runat="server" ID="btnDelete" CssClass="form_btn" Text="删除" Enabled='<%#Eval("IsDeleteEnable")%>'
                                CommandName="delete" CommandArgument='<%#Eval("ColumnNO") %>' OnClientClick="return ConfirmDelete()" />
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </tbody>
                </FooterTemplate>
            </asp:Repeater>
        </table>
        <%-- <%if (this.Repeater1.Controls.Count == 0)
          {
              Response.Write("记录数目为0");
          } %>--%>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="尾页"
            NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged" PrevPageText="上一页"
            ShowInputBox="Always" SubmitButtonText="GO" AlwaysShow="True" CssClass="AspNetPager"
            CustomInfoHTML="  共&lt;span class=&quot;AspNetPager_current&quot;&gt;{0}&lt;/span&gt;页"
            CurrentPageButtonClass="AspNetPager_current" CustomInfoClass="AspNetPager_custom"
            HorizontalAlign="Right" InputBoxClass="AspNetPager_txt" SubmitButtonClass="AspNetPager_btn"
            CurrentPageButtonStyle="" PagingButtonSpacing="1px" ShowCustomInfoSection="Right"
            Visible="false">
        </webdiyer:AspNetPager>
    </div>
</asp:Content>
